package Txtfiction;

import java.io.IOException;
import java.net.ServerSocket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author oldliu
 * @since 1.0
 */
public class MainServer {
    public static void main(String[] args) throws IOException {
        ServerSocket st=new ServerSocket(8888);
        //线程池
        ExecutorService es=Executors.newFixedThreadPool(20);
        while (true){
            es.submit(new ServerThread(st.accept()));
        }
    }
}
